package com.example.exam.pojo;

import lombok.Data;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;


@Data
public class Book {

  private long id;


  @NotEmpty(message= "书的名字不能为空" )
  private String name;

  @DecimalMin(value = "0",message ="价格不能为负数" )
  private double price;

  private java.sql.Timestamp pubTime;

  @NotNull
  private long typeNo;

  @NotEmpty(message= "作者的名字不能为空" )
  private String author;

  @NotEmpty(message= "出版商名字不能为空" )
  private String pubCompany;



}
